﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:windowsPresentation="clr-namespace:GMap.NET.WindowsPresentation;assembly=GMap.NET.WindowsPresentation" x:Class="BTM_Client_Application.MapControl" 
             mc:Ignorable="d" 
             d:DesignHeight="400" d:DesignWidth="600" Initialized="MapControl_OnInitialized">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Styles/UserControls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Styles/ButtonStyles.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Styles/MyResources.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Styles/MyBrushes.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Border BorderThickness="1" BorderBrush="Gray" SnapsToDevicePixels="True">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="26"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="250"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="40"/>
            </Grid.RowDefinitions>
            <!-- Map -->
            <windowsPresentation:GMapControl Name="GmapBox" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="1,1,1,1" 
                                         MouseWheelZoomType="MousePositionWithoutCenter" Zoom="10" Grid.RowSpan="3" Grid.ColumnSpan="2"/>
            <!-- Zoom Box -->

            <Grid Name="ZoomControl" Grid.Column="0" Grid.Row="0" Grid.RowSpan="3">
                <!--
            <Grid.RowDefinitions>
                <RowDefinition Height="26"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Border Name="ZoomLevelBorder" Background="{StaticResource LightBlueBrush}" CornerRadius="4" BorderThickness="1" BorderBrush="DarkGray">
                <TextBlock Name="ZoomLevelBox" Foreground="White" FontFamily="Segoe UI, Verdana" Text="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
            <Button Name="AddZoomButton" Content="+" Grid.Row="1" VerticalAlignment="Top" Background="LightGreen"/>
            -->
            </Grid>



            <Button Name="PrefetchButton" Visibility="Collapsed" Content="Prefetch" Click="PrefetchButton_OnClick" VerticalAlignment="Top" HorizontalAlignment="Left"></Button>
            <Grid HorizontalAlignment="Right" VerticalAlignment="Stretch" Grid.Column="1">
                <windowsPresentation:GMapControl Name="MiniMap" MouseWheel="MiniMap_OnMouseWheel" CanDragMap="False" HorizontalAlignment="Right" VerticalAlignment="Stretch" MaxZoom="5" MinZoom="5" BorderThickness="1,1,1,1" MouseWheelZoomType="MousePositionWithoutCenter" BorderBrush="Black" Width="300">
                </windowsPresentation:GMapControl>
                <Button Name="ShowMiniMapButton" Width="40" Height="40" Style="{StaticResource StandardButton}" Click="ShowMiniMapButton_OnClick" VerticalAlignment="Top" HorizontalAlignment="Right">
                    <Image Source="{StaticResource ArrowCollapsedDark}" Stretch="Uniform"/>
                </Button>
            </Grid>

            <StackPanel Name="EditPanel" Background="Transparent" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Top" Orientation="Horizontal" Margin="0,0,10,0" Grid.Column="1">
                <Button Name="SaveButton" Content="Save" Margin="0,0,5,0" Click="SaveButton_OnClick" Background="LightGreen"/>
                <Button Name="RollbackButton" Content="Rollback" Margin="0,0,5,0" Click="RollbackButton_OnClick" Background="Orange"/>
                <Button Name="ResetOneButton" Content="Reset one" Click="ResetOneButton_OnClick" Background="Khaki"/>
            </StackPanel>

        </Grid>
    </Border>
</UserControl>
